<html>
<head><meta charset="utf-8"><title>AVR · project-inline-asm · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/index.html">project-inline-asm</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/AVR.html">AVR</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="183087699"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/AVR/near/183087699" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/AVR.html#183087699">(Dec 10 2019 at 18:32)</a>:</h4>
<p>I can't promise any concrete time availability, but once this gets further along, I'd love to help with this for AVR.</p>



<a name="183087742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/AVR/near/183087742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/AVR.html#183087742">(Dec 10 2019 at 18:32)</a>:</h4>
<p>Ideally once you've hammered out all the hard abstractions and there's just a simple template for me to fill in ;-)</p>



<a name="183114418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/AVR/near/183114418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/AVR.html#183114418">(Dec 10 2019 at 23:39)</a>:</h4>
<p>Yeah, if we've done it right, it should be just "what are your registers".</p>



<a name="183117522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/AVR/near/183117522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/AVR.html#183117522">(Dec 11 2019 at 00:38)</a>:</h4>
<p>I would expect it to take 2 hours max to add a new architecture. As Josh said, all you need to do is define registers and register classes.</p>



<a name="183121837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/AVR/near/183121837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/AVR.html#183121837">(Dec 11 2019 at 02:17)</a>:</h4>
<p>Well, Josh just said registers. You've doubled the work with also adding specific classes ;-)</p>



<a name="183121880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/AVR/near/183121880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/AVR.html#183121880">(Dec 11 2019 at 02:18)</a>:</h4>
<p>At this doubling rate <span aria-label="upwards trend" class="emoji emoji-1f4c8" role="img" title="upwards trend">:upwards_trend:</span> , there's only a few more "and also" before it gets out of hand <span aria-label="explosion" class="emoji emoji-1f4a5" role="img" title="explosion">:explosion:</span></p>



<a name="183139149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/AVR/near/183139149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/AVR.html#183139149">(Dec 11 2019 at 09:17)</a>:</h4>
<p>O(2^n)? <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="183274019"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/AVR/near/183274019" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/AVR.html#183274019">(Dec 12 2019 at 16:09)</a>:</h4>
<p>I had intended the concept of defining registers to include classifying them. ;)</p>



<a name="200230113"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/AVR/near/200230113" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/AVR.html#200230113">(Jun 09 2020 at 13:52)</a>:</h4>
<p>I expect that the AVR fork will get merged into rust-lang/rust in the next few weeks. Is this implemented enough to dump in some AVR-specific things after that happens?</p>



<a name="200232600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/AVR/near/200232600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/AVR.html#200232600">(Jun 09 2020 at 14:07)</a>:</h4>
<p>Sure!</p>



<a name="200242206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/AVR/near/200242206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/AVR.html#200242206">(Jun 09 2020 at 15:04)</a>:</h4>
<p>Cool. I'm guessing there's not _tons_ of documentation, so do you have any pointers for me to start looking at?</p>



<a name="200255162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/AVR/near/200255162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/AVR.html#200255162">(Jun 09 2020 at 16:24)</a>:</h4>
<p>It's actually very easy, someone has already added NVPTX inline asm support. There's only 2 places you need to modify: src/librustc_target/asm to define the target registers and src/librustc_codegen_llvm/asm.rs to lower to LLVM constraint codes and modifiers.</p>



<a name="200304615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/AVR/near/200304615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/AVR.html#200304615">(Jun 09 2020 at 23:36)</a>:</h4>
<p><span class="user-mention silent" data-user-id="143274">Amanieu</span> <a href="#narrow/stream/216763-project-inline-asm/topic/AVR/near/200255162">said</a>:</p>
<blockquote>
<p>It's actually very easy, someone has already added NVPTX inline asm support. There's only 2 places you need to modify: src/librustc_target/asm to define the target registers and src/librustc_codegen_llvm/asm.rs to lower to LLVM constraint codes and modifiers.</p>
</blockquote>
<p>I think it helps to look through the PR that added initial inline assembly support. I feel like just a skim should be enough to figure out where architecture-specific stuff needs to go. (And what is really necessary)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>